/*
 * Copyright 2007-2010 kingbi.
 * Creator: mouzb
 */
package com.kingbi.system.role.service;

import java.sql.SQLException;
import java.util.List;

import com.kingbi.system.role.model.RoleModel;



/**
 * @author mouzb
 *
 */
public interface RoleService {
	
	/**
	 * 添加记录
	 * @param packModel
	 */
	void saveRole(RoleModel roleModel,String roleFunRight) throws Exception;
	
	/**
	 * 根据orgCode读取一条记录
	 * @param roleID
	 * @return
	 */
	RoleModel loadRole(int roleID) throws Exception;
	
	/**
	 * 根据roleCode查询
	 * @param roleCode
	 * @return
	 * @throws Exception
	 */
	List<RoleModel> loadRoleByCode(String roleCode) throws Exception;
	
	/**
	 * 根据roleID删除一条记录
	 * @param packID
	 */
	void deleteRole(int roleID) throws Exception;
	
	/**
	 * 分页查询机构
	 * @param page
	 * @param max
	 * @return
	 */
	List<RoleModel> listRole(RoleModel RoleModel,int start,int max) throws Exception;
	
	/**
	 * 验证一条记录
	 * @param page
	 * @param max
	 * @param sql_params
	 * @return
	 */
	public List<RoleModel> loadVerifyRole(int page, int max,Object[] sql_params) throws Exception;

	/**
	 * 获取符合条件的总记录数
	 * @param RoleModel
	 * @return
	 */
    long queryCount(RoleModel RoleModel);
    public int getMaxId ();
    public String getMaxRoleId() throws SQLException;
	
	
}
